package com.study.service;

import com.study.service.aop.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;



@Service
public class TestService  implements Test {

	@Autowired
	Test testService2;

	@Autowired
	TestService3 testService3;


	@Override
	public void test() {
//		testService2.test2();
		// final
		testService3.test3();
//		test2();
		System.out.println(" test method running ");
	}

	@Override
	@Async
	public void test2() {
		try {
			Thread.sleep(1000);
			System.out.println("current test2 method running ");
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
